<%@ page language="java" import="java.util.*,cn.ac.cintcm.dataconverge.researcher.domain.*,cn.ac.cintcm.dataconverge.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
Researcher researcher = (Researcher) request.getSession().getAttribute(
		Constants.USER_IN_SESSION);
//boolean isAdmin = AuthCheck.isAdmin(researcher);
boolean isAdmin = AuthCheck.isInGroup(request,Constants.SYSTEM_MANAGER);
boolean isOrgLeader = AuthCheck.isInGroup(request,Constants.ORG_LEADER);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:tvns>
<head>
    <title>系统管理</title>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="<%=basePath %>index/Themes/com/style.css" rel="stylesheet" type="text/css"/>
    <script src="<%=basePath %>index/Scripts/Script.js" language="javascript" type="text/javascript"></script>
    <script type="text/javascript" src="<%=basePath %>index/Scripts/ext-base.js"></script>
    <script type="text/javascript" src="<%=basePath %>index/Scripts/ext-all.js"></script>
    <script type="text/javascript">
	Example = function(){
	        var layout;
	        return {
	            init : function(){
	               layout = new Ext.BorderLayout(document.body, { 
	                    west: {
	                        split:true,
	                        initialSize: 180,
	                        minSize: 175,
	                        maxSize: 400,
	                        titlebar: true,
	                        collapsible: true,
	                        animate: true
	                    },
	                   
	                    center: {
	                        titlebar: false,
	                        autoScroll:true,
	                        tabPosition: 'top',
	                        
                            closeOnTab: true
                        }
	                });
                    layout.beginUpdate();
	                layout.add('west', new Ext.ContentPanel('contrler', {title: '<b>&nbsp;&nbsp;系统管理</b>', fitToFrame:true, closable:false}));
                    layout.add('center', new Ext.ContentPanel('center', {title: '',fitToFrame:true, closable: false}));
	                layout.endUpdate();
	           }
	     };
	       
	}();
	Ext.EventManager.onDocumentReady(Example.init, Example, true);
    </script>

</head>
<body>
    <div id="container">
        <div id="center" class="x-layout-inactive-content">
            <iframe src="<%=path %>/organization.htm" frameborder="0" width="100%" height="100%" scrolling="no" id="Riframe" name="Riframe"></iframe>
        </div>
        <div id="contrler" class="x-layout-inactive-content" style="padding: 5px;">
                      <?IMPORT NAMESPACE = TVNS IMPLEMENTATION = "<%=basePath %>index/Htcs/treeview.htc" />
            <tvns:treeview systemimagespath="<%=basePath %>index/Images/TreeImages/" selectednodeindex="0">
               <tvns:treenode  expanded="True" target="_self"
                    imageurl="<%=basePath %>index/Images/icon_s03_157.gif">
				   
                    
                    <tvns:treenode navigateurl="<%=path %>/organization.htm" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					单位管理
                    </tvns:treenode>
					  <tvns:treenode navigateurl="<%=path %>/department.htm" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					部门管理
                    </tvns:treenode>
                    <%if(isAdmin){ %>
                    <tvns:treenode navigateurl="<%=path %>/systemDict.htm?action=list&dictType=2" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					重点学科配置
                    </tvns:treenode>
                   
                     <tvns:treenode navigateurl="<%=path %>/group.htm" target="Riframe" expanded="True" imageurl="<%=basePath %>index/Themes/com/68design.net_play_16x16.gif">
					用户组管理
                    </tvns:treenode>
                     <%} %> 
					<tvns:treenode navigateurl="<%=path %>/researcher.htm?orderName=id&orderNum=2" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					人员管理
                    </tvns:treenode> 
                     <tvns:treenode navigateurl="<%=path %>/subject.htm?action=listAllSubjectForAdmin" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					课题管理
                    </tvns:treenode> 
                     <tvns:treenode navigateurl="<%=path %>/subjectSearch.htm?action=searchSubject" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					课题缺失信息
                    </tvns:treenode> 
                    <%if(isAdmin) {%>
                     <tvns:treenode navigateurl="<%=path %>/index/Modules/system/sortTree.jsp" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					课题分类配置
                    </tvns:treenode>  
                     <tvns:treenode navigateurl="<%=path %>/systemDict.htm?action=list&dictType=1" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					文档类型配置
                    </tvns:treenode>
                    <tvns:treenode navigateurl="<%=path %>/systemDict.htm?action=middleCheck" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					中期检查配置
                    </tvns:treenode>
                    <%} %> 
                     <tvns:treenode navigateurl="<%=path %>/checkManage.htm?action=listAdminExpertList" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					评审管理
                    </tvns:treenode>   
                    <!--  <tvns:treenode navigateurl="<%=path %>/expert.htm?action=list" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					专家管理
                    </tvns:treenode> --> 
                    <%if(isAdmin||isOrgLeader) {%>
                    <tvns:treenode navigateurl="<%=path %>/subjectModify.htm?action=listAllLogs" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					日志管理
                    </tvns:treenode> 
                    <tvns:treenode navigateurl="<%=path %>/subjectSearch.htm?action=listMessage" target="Riframe" expanded="True" imageurl="<%=basePath %>/index/Themes/com/68design.net_play_16x16.gif">
					通知公告
                    </tvns:treenode>  
                    <%} %>
            </tvns:treeview>
        </div>
    </div>
</body>
</html>

<script language="javascript" type="text/javascript">
    var urlstr = document.location.toString();
	var valuestr="";
	var values;
	var tss = window.location.href.indexOf('?');
	if(tss>1){
		valuestr= unescape(urlstr.substring(urlstr.indexOf("?")+1,urlstr.length));
	    document.getElementById("Riframe").src=valuestr;
	}
</script>